package com.blog.system.constant;

/**
 * @PackgeName: com.blog.system.constant
 * @ClassName: ResultTool
 * @Author: wangyu
 * Date: 2021/3/16 9:21
 * project name: system
 * @Version:
 * @Description: 返回对象构造器
 */
public class ResultTool {

	public static JsonResult success() {
		return new JsonResult(true);
	}

	public static <T> JsonResult<T> success(T data) {
		return new JsonResult<T>(true, data);
	}

	public static JsonResult fail() {
		return new JsonResult(false);
	}

	public static JsonResult fail(ResultCode resultEnum) {
		return new JsonResult(false, resultEnum);
	}
}
